package com.passengerflowmanagementsystem.web.controller.pf;

import com.passengerflowmanagementsystem.common.core.domain.AjaxResult;
import com.passengerflowmanagementsystem.statistics.domain.vo.*;
import com.passengerflowmanagementsystem.statistics.service.IAttentionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.passengerflowmanagementsystem.common.core.controller.BaseController;

/**
 * 海康关注度Controller
 *
 * @author sheng
 * @date 2024-12-30
 */
@RestController
@RequestMapping("/pf/attention")
public class PfAttentionController extends BaseController {

    @Autowired
    private IAttentionService attentionService;

    /**
     * 根据统计组id获取区域关注度相机分割区域信息
     * @return
     */
    @PostMapping("/areaAreaInfo")
    public AjaxResult areaAreaInfo(@RequestBody AreaAreaInfoVo areaAreaInfo){
        return success(attentionService.areaAreaInfo(areaAreaInfo));
    }

    /**
     * 根据统计组id获取关联的点位集合
     * @return
     */
    @PostMapping("/groupCameraList")
    public AjaxResult groupCameraList(@RequestBody GroupCameraListVo groupCameraListVo){
        return success(attentionService.groupCameraList(groupCameraListVo));
    }

    /**
     * 查询热度图列表
     * @return
     */
    @PostMapping("/heatMapList")
    public AjaxResult heatMapList(@RequestBody HeatMapListVo heatMapListVo){
        return success(attentionService.heatMapList(heatMapListVo));
    }

    /**
     * 热度图下载接口
     * @return
     */
    @PostMapping("/heatMapPicDownload")
    public AjaxResult heatMapPicDownload(@RequestBody HeatMapPicDownloadVo heatMapPicDownloadVo){
        return success(attentionService.heatMapPicDownload(heatMapPicDownloadVo));
    }

    /**
     * 根据区域编号获取下级监控点列表
     * @return
     */
    @PostMapping("/regionsRegionIndexCodeCameras")
    public AjaxResult regionsRegionIndexCodeCameras(@RequestBody RegionsRegionIndexCodeCamerasVo regionsRegionIndexCodeCamerasVo){
        return success(attentionService.regionsRegionIndexCodeCameras(regionsRegionIndexCodeCamerasVo));
    }

    /**
     * 查询监控点列表
     * @return
     */
    @PostMapping("/cameraAdvanceCameraList")
    public AjaxResult cameraAdvanceCameraList(@RequestBody CameraAdvanceCameraListVo cameraAdvanceCameraListVo){
        return success(attentionService.cameraAdvanceCameraList(cameraAdvanceCameraListVo));
    }

    /**
     * 查询监控点列表v2
     * @param cameraSearchVo
     * @return
     */
    @PostMapping("/cameraSearch")
    public AjaxResult cameraSearch(@RequestBody CameraSearchVo cameraSearchVo){
        return success(attentionService.cameraSearch(cameraSearchVo));
    }

    /**
     * 获取监控点在线状态
     * @param onlineCameraGetVo
     * @return
     */
    @PostMapping("/onlineCameraGet")
    public AjaxResult onlineCameraGet(@RequestBody OnlineCameraGetVo onlineCameraGetVo){
        return success(attentionService.onlineCameraGet(onlineCameraGetVo));
    }
}
